<?php
namespace tp5_lib\wxwork\model;

use think\Model;

class WxworkUserModel extends Model
{
    protected $table="wxwork_user";
    public function install()
    {
        $table=$this->db()->getTable();
        $sql="CREATE TABLE IF NOT EXISTS `$table` (
            `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
            `user_id` int(11) NOT NULL DEFAULT '0',
            `userid` varchar(40) NOT NULL,
            `name` varchar(40) NOT NULL,
            `mobile` varchar(20) NOT NULL,
            `position` varchar(40) NOT NULL,
            `gender` int(11) NOT NULL,
            `email` varchar(40) NOT NULL,
            `isleader` int(11) NOT NULL,
            `avatar` varchar(100) NOT NULL,
            `telephone` varchar(20) NOT NULL,
            `english_name` varchar(40) NOT NULL,
            `status` int(11) NOT NULL,
            `qr_code` varchar(100) NOT NULL
        ) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
        $this->db()->execute($sql);
    }
}
